import {
	http
} from '@/utils/request/index.js'
// 回款计划管理相关接口

// 查询回款计划列表
export function getReceivablePlanPage(params) {
	return http.get('/crm/receivable-plan/page', params)
}

// 查询回款计划列表
export function getReceivablePlanPageByCustomer(params) {
	return http.get('/crm/receivable-plan/page-by-customer', params)
}

// 查询回款计划详情
export function getReceivablePlan(id) {
	return http.get('/crm/receivable-plan/get', { id })
}

// 查询回款计划下拉数据
export function getReceivablePlanSimpleList(customerId, contractId) {
	return http.get('/crm/receivable-plan/simple-list', { customerId, contractId })
}

// 新增回款计划
export function createReceivablePlan(data) {
	return http.post('/crm/receivable-plan/create', data)
}

// 修改回款计划
export function updateReceivablePlan(data) {
	return http.put('/crm/receivable-plan/update', data)
}

// 删除回款计划
export function deleteReceivablePlan(id) {
	return http.delete('/crm/receivable-plan/delete', { id })
}

// 导出回款计划 Excel
export function exportReceivablePlan(params) {
	return http.download('/crm/receivable-plan/export-excel', params)
}

// 获得待回款提醒数量
export function getReceivablePlanRemindCount() {
	return http.get('/crm/receivable-plan/remind-count')
}